<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>获取文件信息</title>
</head>
<body>
<form action="">
<input type="file" multiple id="fileInput" name="file">
</form>
</body>
</html>

<script>
    var input = document.getElementById("fileInput");

    input.addEventListener('change',function () {
        console.log(this.files);
    })
</script>